﻿using EMall.Application;
using EMall.IdentityService.Users;
using EMall.Query;
using IdentityModel;
using IdentityServer4.Models;

namespace EMall.IdentityService.IdentityServers
{
    public interface IIdentityServerAppService : IApplicationService
    {
        Task CreateClientAsync(CreateClientDto input);
        Task UpdateClientAsync(UpdateClientDto input);
        Task DeleteClientAsync(DeleteClientDto input);
        Task<IdentityServer4.EntityFramework.Entities.Client> GetClientAsync(int id);
        Task<IPagedList<IdentityServer4.EntityFramework.Entities.Client>> GetClientPagedListAsync(GetClientListPagingAndSortingQueryDto input);
        Task CreateApiResourceAsync(CreateApiResourceDto input);
        Task UpdateApiResourceAsync(UpdateApiResourceDto input);
        Task DeleteApiResourceAsync(DeleteApiResourceDto input);
        Task<IdentityServer4.EntityFramework.Entities.ApiResource> GetApiResourceAsync(int id);
        Task<IPagedList<IdentityServer4.EntityFramework.Entities.ApiResource>> GetApiResourcePagedListAsync(GetApiResourceListPagingAndSortingQueryDto input);
        Task CreateApiScopeAsync(CreateApiScopeDto input);
        Task UpdateApiScopeAsync(UpdateApiScopeDto input);
        Task DeleteApiScopeAsync(DeleteApiScopeDto input);
        Task<IdentityServer4.EntityFramework.Entities.ApiScope> GetApiScopeAsync(int id);
        Task<IPagedList<IdentityServer4.EntityFramework.Entities.ApiScope>> GetApiScopePagedListAsync(GetApiScopeListPagingAndSortingQueryDto input);
        Task CreateIdentityResourceAsync(CreateIdentityResourceDto input);
        Task UpdateIdentityResourceAsync(UpdateIdentityResourceDto input);
        Task DeleteIdentityResourceAsync(DeleteIdentityResourceDto input);
        Task<IdentityServer4.EntityFramework.Entities.IdentityResource> GetIdentityResourceAsync(int id);
        Task<IPagedList<IdentityServer4.EntityFramework.Entities.IdentityResource>> GetIdentityResourcePagedListAsync(GetIdentityResourceListPagingAndSortingQueryDto input);
        Task<Resources> GetAllResourcesAsync();
    }
}
